package org.nix.dao;

import org.nix.entity.User;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Query;

/**
 * Create by zhangpe0312@qq.com on 2018/4/19.
 */
public interface UserJpa extends JpaRepository<User,Integer> {

    @Query(nativeQuery = true,
    value = "SELECT * FROM user WHERE user_name = ?1")
    User findUserByName(String userName);

}
